<?php

/* 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

?>
<?php
session_start();
$id=$_GET['book_id'];
$arraysp=explode("@",$_SESSION['booklist']);
$arraysl=explode("@",$_SESSION['quantity']);
for($i=0;$i<count($arraysp);$i++){
   if($arraysp[$i]==$id){
	  $arraysp[$i]="";
	  $arraysl[$i]="";
	}
 }
$_SESSION['booklist']=implode("@",$arraysp);
$_SESSION['quantity']=implode("@",$arraysl);
header("location:cart.php");
?>